import java.util.Scanner;

import java.util.Scanner;

public class demo02 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int arr[] = new int[6];
        for(int i=0;i< arr.length;i++){
            System.out.println("请输入第"+(i+1)+"个评委的打分");
            int score=sc.nextInt();
            if(score>0&&score<100){
                arr[i]=score;
            }
            else {
                System.out.println("数据有误，请输入0-100的数字");
                i--;
            }

        }
        int max=arr[0];
        for (int i=0;i< arr.length;i++){
            if(max<arr[i]){
                max=arr[i];
            }
        }
        int min=arr[0];
        for (int i=0;i< arr.length;i++){
            if(min>arr[i]){
                min=arr[i];
            }
        }
        int sum=0;
        for(int i=0;i<arr.length;i++){
            sum+=arr[i];
        }

        int avg=(sum=sum-max-min)/4;
        System.out.println(avg);
    }
}

